﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="ManagerDuongPho.aspx.cs" Inherits="Continental.Admin.ManagerDuongPho" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_hor_menu" runat="server">
    <ul>
        <li><a href="Index.aspx"><span><strong>TRANG CHỦ</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ SẢN PHẨM</strong></span></a></li>
        <li><a href="ManagerTuDiem.aspx"><span><strong>QUẢN LÝ TỤ ĐIỂM</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ VIỆN ẢNH</strong></span></a></li>
        <li><a href="#"><span><strong>QUẢN LÝ GIẢI TRÍ</strong></span></a></li>
        <li><a href="ManagerUser.aspx"><span><strong>QUẢN LÝ NGƯỜI DÙNG</strong></span></a></li>
        <li><a href="ManagerExtension.aspx" class="active"><span><strong>MỞ RỘNG</strong></span></a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph_menu_content" runat="server">
    <ul>
        <li><a href="ManagerQuanHuyen.aspx">Quản lý Quận/Huyện</a></li>
        <li><a href="ManagerDuongPho.aspx" class="active-left-menu">Quản lý Đường Phố</a></li>
    </ul>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cph_breadcum" runat="server">
    <span class="active-bread">Quản lý Đường Phố</span>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cph_main_content" runat="server">
    <table id="tblThemMoi">
        <tr>
            <td colspan="3">
                <h1>
                    <asp:Literal ID="ltlStatus" runat="server" Text="Thêm Mới"></asp:Literal></h1>
            </td>
            <td>
                Danh sách Quận Huyện
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <%= message %>
            </td>
             <td rowspan="3">
                <asp:CheckBoxList ID="cklQuanHuyen" runat="server" RepeatColumns="5" DataTextField="TitleOrName" DataValueField="QuanHuyenID">
                </asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td>
                Tên
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtTitleOrName" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfvTen" ControlToValidate="txtTitleOrName" runat="server"
                    ValidationGroup="CAPNHAT" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Số thứ tự
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtNumberOfOrder" runat="server" Width="300px" MaxLength="2" Text="1"></asp:TextBox>
            </td>
        </tr>
    </table>
    <div class="command-box">
        <asp:Button ID="btnSave" runat="server" Width="100px" Text="Thêm mới" ValidationGroup="CAPNHAT"
            Font-Bold="true" OnClick="btnSave_Click" />&nbsp;
        <asp:Button ID="btnDelete" runat="server" Text="Xóa" Width="100px" OnClientClick="return confirm('Xác nhận hành động xóa?')"
            Font-Bold="true" OnClick="btnDelete_Click" />
        <asp:Button ID="btnCancel" runat="server" Text="Hủy" Width="100px" Font-Bold="true"
            OnClick="btnCancel_Click" />
    </div>
    <hr />
    <h4>
        Danh sách Đường Phố (<span style="color: Red; font-weight: bold"><%= amountOfDuongPho %></span>):</h4>
    <table style="width: 100%">
        <tr>
            <td>
                Quận Huyện
            </td>
            <td>
                <asp:DropDownList ID="ddlQuanHuyen" runat="server" Width="300px" DataTextField="TitleOrName"
                    DataValueField="QuanHuyenID" OnDataBound="ddlQuanHuyen_DataBound">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" Width="150px" 
                    onclick="btnSearch_Click" />
            </td>
            <td>
            </td>
        </tr>
    </table>
    <asp:ListView ID="lvDuongPho" runat="server" GroupPlaceholderID="Group" ItemPlaceholderID="Item"
        GroupItemCount="1">
        <LayoutTemplate>
            <table id="tbl-Coupon">
                <tr>
                    <th>
                        Tên đường phố
                    </th>
                    <th>
                        Thứ tự sắp xếp
                    </th>
                    <th>
                        Số Tụ Điểm
                    </th>
                </tr>
                <asp:PlaceHolder ID="Group" runat="server"></asp:PlaceHolder>
            </table>
        </LayoutTemplate>
        <GroupTemplate>
            <tr>
                <asp:PlaceHolder ID="Item" runat="server"></asp:PlaceHolder>
            </tr>
        </GroupTemplate>
        <ItemTemplate>
            <td>
                <a href='ManagerDuongPho.aspx?DuongPhoID=<%# Eval("DuongPhoID") %>'>
                    <%# Eval("TitleOrName") %></a>
            </td>
            <td>
                <%# Eval("NumberOfOrder")%>
            </td>
            <td>
                <%# Eval("AmountOfTuDiem")%>
            </td>
        </ItemTemplate>
    </asp:ListView>
    <p>
        <asp:DataPager ID="dpDuongPho" runat="server" PagedControlID="lvDuongPho" PageSize="40"
            OnPreRender="dpDuongPho_PreRender">
            <Fields>
                <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False"
                    ShowPreviousPageButton="False" />
                <asp:NumericPagerField />
                <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowNextPageButton="False"
                    ShowPreviousPageButton="False" />
            </Fields>
        </asp:DataPager>
    </p>
</asp:Content>
